home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 2 / CU Amiga Magazine's Super CD-ROM 02 (1996)(EMAP Images)(GB)[!][issue 1996-04].iso / magazine / amiga_e / amigae.sept.archive / 000033_crash!stack.urc.tue.nl!leon_Thu, 16 Sep 93 05:42:14 PST.msg < prev    next >
Text File  |  1993-11-02  |  2KB  |  59 lines

  1. Received: by bkhouse.cts.com (V1.16/Amiga)
  2.     id AA00000; Thu, 16 Sep 93 05:42:14 PST
  3. Received: from mailhost.tue.nl by crash.cts.com with smtp
  4.     (Smail3.1.28.1 #18) id m0odIHX-00000qC; Thu, 16 Sep 93 05:17 PDT
  5. Received: from terra.stack.urc.tue.nl by mailhost.tue.nl with SMTP id AA18052
  6.   (5.65c/IDA-1.4.4 for <amigae@bkhouse.cts.com>); Thu, 16 Sep 1993 14:17:42 +0200
  7. Received: from blade.stack.urc.tue.nl by terra.stack.urc.tue.nl (4.1/1.53)
  8.     id AA16648; Thu, 16 Sep 93 14:14:43 +0200
  9. Received: by blade.stack.urc.tue.nl (4.1/1.53)
  10.     id AA28361; Thu, 16 Sep 93 14:16:04 +0200
  11. Message-Id: <9309161216.AA28361@blade.stack.urc.tue.nl>
  12. Date: Thu, 16 Sep 1993 14:16:02 +0200 (MET DST)
  13. X-Mailer: ELM [version 2.4 PL20]
  14. Mime-Version: 1.0
  15. Content-Type: text/plain; charset=US-ASCII
  16. Content-Transfer-Encoding: 7bit
  17. Content-Length: 1222
  18. From: leon@stack.urc.tue.nl (Leon Woestenberg)
  19. To: amigae@bkhouse.cts.com (AmigaE Mailing List)
  20. Subject: Pointer to PROC with AddTask??
  21.  
  22. Hello fellows!
  23.  
  24. I nEEd somE hEEElp hErE...
  25.  
  26. I'm having troubles converting a C source, that demonstrates the starting of
  27. and communication between the maintask and a daughtertask (which is started
  28. from the maintask). The C source is on aminet misc/amag/Amiga_9309b.lha and
  29. called 'Multitask/task.c'.
  30.  
  31. The problem comes with 'AddTask', which needs a pointer to the daughtertask.
  32. I now know that {procname} is the address of the procedure in AmigaE, but
  33. I can't get the AmigaE version working (it crashes).
  34.  
  35. Does someone know how to add a PROCedure as a new task in AmigaE??
  36. I cut out some source from the C source.
  37.  
  38. This is the daughtertask procedure:
  39. -----
  40. void __saveds __interrupt TochterTask(void) {
  41.   StopTochterTaskSig=AllocSignal(-1L);
  42.   Signal( MainTask, 1L<<TochterStartedSig );
  43.   while( (SetSignal(0L,0L) &
  44.                     (1L<<StopTochterTaskSig)) == 0)
  45.     TochterCounter++;
  46.   FreeSignal( StopTochterTaskSig );
  47.   Signal( MainTask, 1L<<TochterStartedSig );
  48.   Wait(0);
  49. }
  50. -----
  51. Line of the maintask, which starts the daughtertask:
  52. -----
  53. AddTask(Tochter,(APTR)TochterTask,0L);
  54. -----
  55.  
  56. --
  57. Signatures sold out at the time....  Leon Woestenberg (leon@stack.urc.tue.nl)
  58. If lines are busy, try later. But DO call!
  59. --